/*
 *  Copyright (c) 2022 ZhuHai Jieli Technology Co.,Ltd.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#ifndef ASM_UART_H
#define ASM_UART_H

#define UART_NUM             3
#define UART_OUTPORT_NUM     4

#include "device/uart.h"
#include "device/device.h"

#define UART0_PLATFORM_DATA_BEGIN(data) \
    static const struct uart_platform_data data = {

#define UART0_PLATFORM_DATA_END()  \
    .irq                     = IRQ_UART0_IDX, \
};

#define UART1_PLATFORM_DATA_BEGIN(data) \
    static const struct uart_platform_data data = {

#define UART1_PLATFORM_DATA_END()  \
    .irq                     = IRQ_UART1_IDX, \
};

#define UART2_PLATFORM_DATA_BEGIN(data) \
    static const struct uart_platform_data data = {

#define UART2_PLATFORM_DATA_END()  \
    .irq                     = IRQ_UART2_IDX, \
};

extern const struct device_operations uart_dev_ops;

extern int uart_init(const struct uart_platform_data *);

#endif

